<%@page import="zy.ejb.EJBFactory"%>
<%@ page contentType="text/html; charset=GBK"%>
<%@ page
	import="zy.jpa.PersonDAO,zy.jpa.Person,
javax.naming.*,
java.util.Properties,
java.util.Date,
java.util.List,
java.text.SimpleDateFormat"%>
<TABLE width="80%" border="1">
	<TR bgcolor="#DFDFDF">
		<TD>personid</TD>
		<TD>name</TD>
		<TD>sex</TD>
		<TD>age</TD>
		<TD>birthday</TD>
	</TR>
	<%
		try {

			PersonDAO persondao = (PersonDAO) EJBFactory
					.getJboss7SessionEJB_DAO();
			persondao.batchInsertDemoPersions();
			List list = persondao.getPersonList();
			for (int i = 0; i < list.size(); i++) {
				Person person = (Person) list.get(i);
				out.println("<TR><TD>" + person.getPersonid() + "</TD><TD><input type='text' value='"
						+ person.getName() + "'/></TD><TD>" + person.getSex()
						+ "</TD><TD><input type='text' value='" + person.getAge() + "'/></TD><TD><input type='text' value='"
						+ person.getBirthday() + "'/></TD></TR>");
			}
		} catch (Exception e) {
			out.println(e.getMessage());
		}
	%>
</TABLE>